package org.cn.lennon.mybatis.executors.impl;

import java.sql.SQLException;

import org.cn.lennon.mybatis.executors.Executors;
import org.cn.lennon.mybatis.transcation.Transaction;

public abstract class BaseExecutors implements Executors{

	protected Transaction transaction;

	public BaseExecutors(Transaction transaction) {
		this.transaction = transaction;
	}
	
	public void commit() throws SQLException {
		transaction.getConnection().commit();
	}

	public void rollback() throws SQLException {
		transaction.getConnection().rollback();
	}

	public void close() throws SQLException {
		transaction.getConnection().close();
	}

	public Integer getTimeout() throws SQLException {
		return null;
	}
}
